<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Pointapi extends Model
{
    protected $table = 'pointsfor';
    public $timestamps = false;
    protected $guarded = [
        'name', 'money', 'weixin', 'ishavehouse', 'apply_time', 'updated_at', 'deleted_at'
    ];


    public function getData(){
        $pointforList = array();
        $sql = \DB::table($this->table)
            ->whereNull('deleted_at');

        $pointforList['list'] = $sql->select('created_at','money','withdrawal_address','point_month')
            ->orderby('created_at','desc')
            ->get();

        return $pointforList;
    }

    public function saveData($data){
        return \DB::table($this->table)->insert($data);
    }



}